import React, { useEffect } from "react";
import { useParams } from "react-router-dom";
import Main from "@/components/Main";
import { getArticleDetail } from "@/api/index.ts";

export default function Detail() {
  // 获取url 参数
  const { art_id } = useParams();
  useEffect(() => {
    getDetail();
  }, []);

  // 获取文章列表数据
  const getDetail = () => {
    getArticleDetail(art_id).then((res) => {
      console.log("res", res);
    });
  };
  return (
    <>
      <Main>
        <h1>获取url 参数</h1>
      </Main>
    </>
  );
}
